package cn.com.blueInfo.HaiYuan.business.supplier.controller;

import cn.com.blueInfo.HaiYuan.business.supplier.service.SupplierBaseService;
import cn.com.blueInfo.utils.result.BootstrapTable;
import cn.com.blueInfo.utils.result.ResultInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * 供应商基本信息管理
 * @ClassName: SupplierBaseController
 * @author suxch
 * @date 2019年4月24日  上午10:36:03
 */
@RestController
@RequestMapping("/operation/business/supplierBase")
public class SupplierBaseController {

    @Autowired
    private SupplierBaseService baseService;

    /**
     * 分页查询供应商基本信息
     * @Title: querySupplierBaseInfoByPage
     * @param request
     * @return BootstrapTable
     * @throws
     */
    @RequestMapping("/querySupplierBaseInfoByPage.do")
    public BootstrapTable querySupplierBaseInfoByPage(HttpServletRequest request) {
        return baseService.querySupplierBaseDataByPage(request);
    }

    /**
     * 查询供应商基本信息
     * @Title: querySupplierBaseInfo
     * @param request
     * @return ResultInfo
     * @throws
     */
    @RequestMapping("/querySupplierBaseInfo.do")
    public ResultInfo querySupplierBaseInfo(HttpServletRequest request) {
        return baseService.querySupplierBaseData(request);
    }

    /**
     * 获取最大排序编号
     * @Title: getMaxOrderNumber
     * @param request
     * @return ResultInfo
     * @throws
     */
    @RequestMapping("/getMaxOrderNumber.do")
    public ResultInfo getMaxOrderNumber(HttpServletRequest request) {
        return baseService.queryMaxOrderNumber(request);
    }

    /**
     * 新增供应商基本信息
     * @Title: addSupplierBaseInfo
     * @param request
     * @return ResultInfo
     * @throws
     */
    @RequestMapping("/addSupplierBaseInfo.do")
    public ResultInfo addSupplierBaseInfo(HttpServletRequest request) {
        return baseService.addSupplierBaseData(request);
    }

    /**
     * 更新供应商基本信息
     * @Title: updateSupplierBaseInfo
     * @param request
     * @return ResultInfo
     * @throws
     */
    @RequestMapping("/updateSupplierBaseInfo.do")
    public ResultInfo updateSupplierBaseInfo(HttpServletRequest request) {
        return baseService.updateSupplierBaseData(request);
    }

    /**
     * 删除供应商基本信息
     * @Title: deleteSupplierBaseInfo
     * @param request
     * @return ResultInfo
     * @throws
     */
    @RequestMapping("/deleteSupplierBaseInfo.do")
    public ResultInfo deleteSupplierBaseInfo(HttpServletRequest request) {
        return baseService.deleteSupplierBaseData(request);
    }

}
